<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="/WEB-INF/jsp/include.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
  	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>用户修改密码</title>
	<meta http-equiv="pragma" content="no-cache" />
	<meta http-equiv="keywords" content="" />
	<meta http-equiv="description" content="" />
	<link href="${ctx}/css/main.css" rel="stylesheet" type="text/css" />
	<link rel="stylesheet" type="text/css" href="${ctx}/js/easyui/themes/default/easyui.css"/>
	<link rel="stylesheet" type="text/css" href="${ctx}/js/easyui/themes/icon.css"/>
	<style type="text/css">
		#main{
			width:80%;
		}
	</style>
	<script type="text/javascript" src="${ctx}/js/jquery-1.4.2.js"></script>
	<script type="text/javascript" src="${ctx}/js/jquery.validate.js"></script>
	<script type="text/javascript" src="${ctx}/js/jquery.metadata.js"></script>
	<script type="text/javascript" src="${ctx}/js/easyui/jquery.easyui.min.js"></script>
	<script type="text/javascript">
		$(function() {
			$('#sub').removeAttr('disabled');

			$.validator.setDefaults({
				submitHandler: function(form) {
					$('#sub').attr('disabled','disabled');
					form.submit();
				},
				meta: "validate",
				ignoreTitle: true//解决与google Toolbar的冲突
			});
			$("#theform").validate({
				rules:{
					"user.password":{
							required:true,
							maxlength:64,
							minlength:6,
							rangelength:[6,16]
						},
					"conPassword":{
							required:true,
							maxlength:64,
							minlength:6,
							rangelength:[6,16],
							equalTo:"#password"
						}
				},
				messages:{
					"conPassword":{
						equalTo:"两次输入密码不一致，请重新输入"
					}
				},
				success: function(label) {
					label.addClass("valid").html("<img src='${ctx}/images/ok.gif' border='0'/>")
				},
				ignore: ".ignore"
			});
		});	
	</script>
  </head>
  <body>
  	<div id="main">
   		<div class="titlediv">您所在的位置：用户密码修改</div>
    	<div id="content" class="margin_10">
    	<div><center><span class="red">${errorMessage}</span></center></div>
    	<form id="theform" action="${ctx}/changePwdSubmit.do" method="post">
    		<input type="hidden" name="ticket" value="${ticket}"/>
    		<div id="form">
	    		<table cellpadding="0" cellspacing="0" border="0" style="width:50%" class="querytab">
	    			<tr>
		    			<td class="alignright">用户名：</td><td class="alignleft">${user.username}</td>
		    		</tr>
		    		<tr><td class="alignright"><span>姓名：</span></td><td class="alignleft">${user.name}</td></tr>
	    			<tr><td class="alignright"><span class="red spanmargin">*</span><span>新密码：</span></td><td class="alignleft"><input id="password" type="password" name="password" maxlength="16"/></td></tr>
	    			<tr><td class="alignright"><span class="red spanmargin">*</span><span>确认新密码：</span></td><td class="alignleft"><input type="password" name="conPassword" maxlength="16"/></td></tr>
	    		</table>
    		</div>
    		<div id="foot"><center><input id="sub" type="submit" value="提交 "/></center></div>
    		<div class="margin_10">&nbsp;</div>
    	</form>
    	</div>
    </div>
  </body>
</html>
